/*
 * @Author: life 2145887855@qq.com
 * @Date: 2025-03-23 12:17:43
 * @LastEditors: life 2145887855@qq.com
 * @LastEditTime: 2025-03-24 13:18:58
 * @FilePath: \ruoyi-ui\src\api\system\whitelist.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询会员车辆列表
export function listWhitelist(scWhitelistId,scValidPeriodStart,scValidPeriodEnd,scIsActive) {
  return request({
    url: '/system/smart/getwhilelistcards',
    method: 'get',
    params: 
    {
      scWhitelistId,
      scValidPeriodEnd,
      scValidPeriodStart,
      scIsActive
    }
  })
}

// 查询会员车辆详细
export function getWhitelist(scWhitelistId) {
  return request({
    url: '/system/whitelist/' + scWhitelistId,
    method: 'get'
  })
}

// 新增会员车辆
export function addWhitelist(data) {
  return request({
    url: '/system/smart/whileadd',
    method: 'post',
    data: data
  })
}

// 修改会员上下架
export function updateWhitelist(scWhitelistId, isactive) {
  return request({
    url: '/system/smart/updatewhilelistcards',
    method: 'get',
    params: {
      scWhitelistId,
      isactive
    }
  })
}

// 修改会员规则信息
export function updateWhitelistMessage(data) {
  return request({
    url: '/system/smart/updatewhilelistInfo',
    method: 'post',
    data:data
  })
}

// 删除会员车辆
export function delWhitelist(scWhitelistId) {
  return request({
    url: '/system/whitelist/' + scWhitelistId,
    method: 'delete'
  })
}
